Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Use postgres-specific tables to read database schema #321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mat128
Copy link

@mat128 mat128 commented Jun 13, 2018

Fixes performance issues noted in #199.

On my production server, the original query took 22 seconds to retrieve 272 rows. This new query takes 204ms and retrieves the same rows.

This is based off @alextech query in #199 and adapted to be a drop-in replacement (it returns the correct values for check_option and is_updatable.

Closes #199

@ezimuel
Copy link
Contributor

ezimuel commented Aug 7, 2018

@mat128 thank for the PR, it looks very good! We need to provide a test for this change. We have a test/integration folder where we can test PostgreSQL using Travis CI, see this database test configuration.
Have a look and let me know if you need assistance adding this integration test, thanks!

@weierophinney
Copy link
Member

This repository has been moved to laminas/laminas-db. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-db to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-db.
  • In your clone of laminas/laminas-db, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

@michalbundyra
Copy link
Member

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#48.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostgresqlMetadata works very-very slowly
4 participants